﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
using System.Data;
using System.IO;

namespace MusicOnSpace
{
    public class Member
    {
        public string memId { get; set; }
        public string memName { get; set; }
        //public int memAge { get; set; }
        public string memSex { get; set; }
        public string memUsername { get; set; }
        public string memPass { get; set; }
        public string memNation { get; set; }
        public string memGenre { get; set; }

        public List<Member> memberList = new List<Member>();

        dataProvider dp = new dataProvider();

        public void InsertMember(string id, string name, string sex, string username, string pass, string nation, string genre)
        {
            string command = "Insert into Member(memId, memName, memSex, memUsername, memPass, memEmail, memNation, memFav) values ("+ id +","+name+","+sex+","+username+","+pass+"+"+nation+","+genre+")";
            
            dp.ExeCuteNonQuery(command);
        }

        public void DeleteMember(string id)
        {
            string command = "";
            dp.ExeCuteNonQuery(command);
        }

        public void MemSearch(string name)
        {
            string command = "Select * from Member where name like 'N"+ name+ "'";
            dp.ExeCuteNonQuery(command);
        }

        public void GetMember()
        {
            
        }

        public List<Member> AddMember()
        {
            //SqlCommand cmd = new SqlCommand ("Insert into Member (
            
            return memberList; 
        }


    }
}